function om = gradient_image(path)

im = imread(path);

s1 = [1 2 1; 0 0 0 ; -1 -2 -1];

s2 = [1 0 -1 ; 2 0 -2 ; 1 0 -1];

H1 = conv2(double(im) , s1);
H2 = conv2(double(im) , s2);

om = (H1.^2+H2.^2).^0.5;

[dim1 dim2] = size(om);

om = om(2: dim1-1 , 2:dim2-1);

imshow(om, [])